using System;
using System.ComponentModel;


namespace FinlogiK.FxCop.Statistics
{
	/// <summary>
	/// Provides data for the <see cref="M:StatisticsCollector.OperationStarting"/> event.
	/// </summary>
	public sealed class AnalysisOperationStartingEventArgs : CancelEventArgs
	{
		#region Fields

		private readonly AnalysisOperation _operation;
		
		#endregion

		#region Constructors

		internal AnalysisOperationStartingEventArgs(AnalysisOperation operation)
			: this(operation, false)
		{
		}

		internal AnalysisOperationStartingEventArgs(AnalysisOperation operation, bool cancel)
			: base(cancel)
		{
			this._operation = operation;
		}

		#endregion

		#region Properties

		/// <summary>
		/// Gets an identifier for the operation that has started.
		/// </summary>
		public AnalysisOperation Operation
		{
			get
			{
				return this._operation;
			}
		}

		#endregion
	}
}